#include <iostream>

const int MAX_SIZE = 100;

class SeqQueue {
	private:
		int data[MAX_SIZE];
		int front;
		int rear;
	public:
		SeqQueue() : front(0), rear(0) {}

		bool isEmpty() const {
			return front == rear;
		}

		bool isFull() const {
			return (rear + 1) % MAX_SIZE == front;
		}

		void enqueue(int value) {
			if (isFull()) {
				std::cout << "Queue is full. Cannot enqueue." << std::endl;
				return;
			}
			data[rear] = value;
			rear = (rear + 1) % MAX_SIZE;
		}

		bool dequeue(int &value) {
			if (isEmpty()) {
				std::cout << "Queue is empty. Cannot dequeue." << std::endl;
				return false;
			}
			value = data[front];
			front = (front + 1) % MAX_SIZE;
			return true;
		}

		bool peek(int &value) const {
			if (isEmpty()) {
				std::cout << "Queue is empty. Cannot peek." << std::endl;
				return false;
			}
			value = data[front];
			return true;
		}
};

int main() {
	SeqQueue queue;

	queue.enqueue(10);
	queue.enqueue(20);
	queue.enqueue(30);

	int value;
	if (queue.dequeue(value)) {
		std::cout << "Dequeued value: " << value << std::endl;
	}

	if (queue.peek(value)) {
		std::cout << "Front value: " << value << std::endl;
	}

	return 0;
}